FROM golang:alpine AS builder

ENV CGO_ENABLED 0
ENV GOPROXY https://goproxy.cn,direct
WORKDIR /build

COPY . .
RUN go build -o server cmd/main.go


FROM alpine

WORKDIR /build
COPY --from=builder /build/server /build/server

CMD ["./server"]
EXPOSE 9000